﻿using System;
using UnityEngine;

namespace Studio
{
	// Token: 0x0200055C RID: 1372
	public class ColorPaletteCtrl : MonoBehaviour
	{
		// Token: 0x1700043B RID: 1083
		// (get) Token: 0x06002300 RID: 8960 RVA: 0x000D3E48 File Offset: 0x000D2048
		// (set) Token: 0x06002301 RID: 8961 RVA: 0x000D3E50 File Offset: 0x000D2050
		public bool visible
		{
			get
			{
				return this.m_Visible;
			}
			set
			{
				this.m_Visible = value;
				this.canvas.enabled = (this.m_Visible && this.m_OutsideVisible);
				if (!this.m_Visible)
				{
					this.colorMenu.updateColorFunc = null;
				}
				if (this.canvas.enabled)
				{
					SortCanvas.select = this.canvas;
				}
			}
		}

		// Token: 0x1700043C RID: 1084
		// (set) Token: 0x06002302 RID: 8962 RVA: 0x000D3EB8 File Offset: 0x000D20B8
		public bool outsideVisible
		{
			set
			{
				this.m_OutsideVisible = value;
				this.canvas.enabled = (this.m_Visible && this.m_OutsideVisible);
			}
		}

		// Token: 0x06002303 RID: 8963 RVA: 0x000D3EE0 File Offset: 0x000D20E0
		private void Awake()
		{
			this.m_Visible = true;
			this.m_OutsideVisible = true;
			this.visible = false;
		}

		// Token: 0x04002408 RID: 9224
		[SerializeField]
		private Canvas canvas;

		// Token: 0x04002409 RID: 9225
		[SerializeField]
		private UI_ColorMenu colorMenu;

		// Token: 0x0400240A RID: 9226
		private bool m_Visible = true;

		// Token: 0x0400240B RID: 9227
		private bool m_OutsideVisible = true;
	}
}
